import { http } from "@/apis/http";
import type { ApiResponse } from "@/apis/types/Response";
import type { TagVo, Tag } from "@/apis/types/Tag";

export const tagApi = {
  /**
   * 获取所有标签数量
   */
  getCountList() {
    return http.get<ApiResponse<TagVo[]>>("/content/tag/countList");
  },
  getTags(categoryId: number) {
    return http.get<ApiResponse<Tag[]>>("/content/tag/getTags", {
      params: {
        categoryId: categoryId,
      },
    });
  },
};
